Mobile communication devices (“mobile devices”) such as smartphones typically include a variety of hardware sensors for collecting environmental data and data regarding a state of the device. The sensors are used by variety of applications and services on the device to enhance device usability and user experience. Sensors can include for example accelerometers, microphones, proximity sensors, luxmeters, GPS receivers, magnetometers, and gyroscopes.
An accelerometer measures acceleration a device may experience, for example sensing shock or vibration in the pocket or vehicle of the device user. A microphone can be used to sense voice to enable telephone communications or for recording environmental sounds. A proximity sensor can for example generate an electromagnetic field and detect changes in the field to determine how close the device is to a person or object. A lux meter can measure ambient light. A GPS receiver uses data from Global Positioning System satellites to determine a position of the device. A magnetometer determines an orientation of the device relative to the earth's magnetic field, for example north, south, east, and west. Changes in the orientation of the device can be determined based on detection by a gyroscope of angular rate of the device.